package sort;

public class InsertionSort<T extends Comparable<T>> extends Sort<T> {

    @Override
    public void sort(T[] nums) {
        int N = nums.length;
        for (int i = 1; i < N - 1; i++){
            for (int j = i; j > 0 && less(nums[j], nums[j - 1]); j--){
                swap(nums, j, j - 1);
            }
        }
    }
}
